﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PlantEdit.aspx.cs" Inherits="PPAP.Web.Supplier.PlantEdit" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script type="text/javascript">
        function check() {
            var txtPlantCode = document.getElementById("txtPlantCode");
            var txtPlantName = document.getElementById("txtPlantName");
            var txtMainBusiness = document.getElementById("txtMainBusiness");
            var txtAddress = document.getElementById("txtAddress");
            //            if (txtPlantCode.value == "") {
            //                alert(" 'Plant code' for must fill in the item");
            //                txtPlantCode.focus();
            //                return false;
            //            }
            if (txtPlantName.value == "") {
                alert("'Plant name' for must fill in the item");
                txtPlantName.focus();
                return false;
            }
            if (txtMainBusiness.value == "") {
                alert("'Main business' for must fill in the item");
                txtMainBusiness.focus();
                return false;
            }
            if (txtAddress.value == "") {
                alert("'Address' for must fill in the item");
                txtAddress.focus();
                return false;
            }


            return confirm('Are you sure you want to save?');
        }
    </script>
    <style type="text/css">
        td
        {
            height: 28px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <table width="100%" style="margin-left: 0px; margin-top: 20px;" align="center">
            <tr class="line-odd">
                <td align="right" style="font-weight: bold;" width="150px">
                    Supplier code&nbsp;
                </td>
                <td>
                    <asp:TextBox ID="txtSupplierNo" runat="server" Enabled="False" Width="300px"></asp:TextBox>
                </td>
            </tr>
            <tr class="line-odd">
                <td align="right" style="font-weight: bold;">
                    Supplier name&nbsp;
                </td>
                <td>
                    <asp:TextBox ID="txtSupplierName" runat="server" Enabled="False" Width="300px"></asp:TextBox>
                </td>
            </tr>
            <tr class="line-odd" style="display:none;">
                <td align="right" style="font-weight: bold;">
                    Plant code&nbsp;
                </td>
                <td>
                    <asp:TextBox ID="txtPlantCode" runat="server" Width="300px"></asp:TextBox><font color='red'>*</font>
                </td>
            </tr>
            <tr class="line-odd">
                <td align="right" style="font-weight: bold;">
                    Plant name&nbsp;
                </td>
                <td>
                    <asp:TextBox ID="txtPlantName" runat="server" Width="300px"></asp:TextBox><font color='red'>*</font>
                </td>
            </tr>
            <tr class="line-odd">
                <td align="right" style="font-weight: bold;">
                    Main business&nbsp;
                </td>
                <td>
                    <asp:TextBox ID="txtMainBusiness" runat="server" Width="300px"></asp:TextBox><font
                        color='red'>*</font>
                </td>
            </tr>
            <tr class="line-odd">
                <td align="right" style="font-weight: bold;">
                    Address&nbsp;
                </td>
                <td>
                    <asp:TextBox ID="txtAddress" runat="server" Width="300px"></asp:TextBox>
                    <font
                        color='red'>*</font>
                </td>
            </tr>
            <tr class="line-odd">
                <td align="right" style="font-weight: bold;">
                    Telephone&nbsp;
                </td>
                <td>
                    <asp:TextBox ID="txtTelephone" runat="server" Width="300px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td colspan="2" align="center">
                    <asp:Button ID="Button1" runat="server" Text="Add" OnClick="Button1_Click" CssClass="button"
                        OnClientClick="return check();" />
                </td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>
